
<!-- saved from url=(0043)http://www.hao123.com/haoserver/jstohtm.htm -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style>
        body {
            margin: 0
        }
        textarea {
            width: 760;
            height: 180;
            font-size: 9pt;
            font-family: Courier New;
            color: #666666
        }
        button{
            cursor: pointer;
        }
    </style>
    <title>html转换成js</title>
    <style type="text/css">
        <!-- td,
        body {
            font-size: 9pt
        }

        a:link {
            color: #000000;
            text-decoration: none
        }

        a:visited {
            COLOR: #000000;
            TEXT-DECORATION: none
        }

        a:active {
            color: green;
            text-decoration: none
        }

        a:hover {
            color: red;
            text-decoration: underline
        }

        body {
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
        }

        .f9 {
            font-size: 12px;
        }

        #sfont a,
        #sfont b {
            font-size: 13px;
        }

        .f9pt {
            font-size: 12px;
        }

        -->
    </style>
    <!--<base target="_blank">--><base href="." target="_blank">
    <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
    <script>
	    function change() {
			$.ajax({
	            type: "post",
	            url: '/html2js',
	            data: { "html": $("#oSource").val()},
	            dataType: "text",
	            success: function(data){
	                $("#oResult").val(data);
	            }
	        });
		}
    </script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <div align="center">
        
        <center>
            <p>
                <a href="js2html.html" target="_self">JS转HTML</a>&nbsp;&nbsp;
                <font color="#FF0000">HTML转JS</font>
            </p>
        </center>
        请将HTML源代码拷贝到下面表单中:
        <br>
        <textarea id="oSource"></textarea>
        <br>
        <br>
        <button id="btn-trans" onclick="change();">转换</button>
        <br>
        <br> 下面表单中是相应的JS代码:
        <br>
        <textarea cols="100" id="oResult"></textarea>
        <br>
        
    </div>
    
</body></html>